package com.ssm.zy.common.result;

import lombok.Data;

/**
 * @author 郑智辰~
 * @version 1.0
 */
public enum ResultCode {
    SUCCESS(true,200,"操作成功"),
    ERROR(false,400,"操作失败"),
    LOGIN_ERROR(false,401,"登录失败"),
    SERVER_ERROR(false,99999,"抱歉，系统繁忙，请稍后重试！"),
    UNAUTHENTICATED(false,10002,"您还未登录"),
    UNAUTHORISE(false,10003,"权限不足");

    private Boolean isSuccess;
    private Integer code;
    private String message;

    ResultCode(Boolean isSuccess ,Integer code, String message) {
        this.isSuccess = isSuccess;
        this.code = code;
        this.message = message;
    }

    public Boolean getIsSuccess() {
        return isSuccess;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
